<template>
  <view class="total-container">
    <view class="title">{{ Events.title }}</view>
  </view>
  <up-action-sheet :actions="list" v-model="show"></up-action-sheet>
</template>

<script setup>
import { onMounted, ref } from "vue";
import { useEventsStore } from "../../store/modules/Events/index";

// import UpActionSheet from "uview-plus/components/up-action-sheet/up-action-sheet.vue";
const list = ref([
  {
    text: "点赞",
    color: "blue",
    fontSize: 28,
  },
  {
    text: "分享",
  },
  {
    text: "评论",
  },
]);

const show = ref(true);
const useEvents = useEventsStore();
onMounted(() => {
  useEvents.showEvents(); // 页面加载时调用 showEvents 更新标题
  load(); //页面加载时调用
});
const Events = ref({});
const load = () => {
  console.log("获取Id", useEvents.index);
  const showEvents = useEvents.Events;
  console.log("获取数据", showEvents);
  Events.value = showEvents;
};

const active = ref(1);
</script>

<style lang="scss" scoped>
.total-container {
  padding: 20rpx 40rpx;
}
</style>
